package com.example.kotlinview.flow

import com.example.utils.line

/*
同样多的内容
分多次打印
和一次打印的耗时
结果证明，一次打印更快
*/
fun main() {
    var time1=System.currentTimeMillis();
    for (i in 0..1000){
        println("------------------------------")
    }
    var time2=System.currentTimeMillis();
    var stringBuffer = StringBuffer()
    var time3=System.currentTimeMillis();
    for (i in 0..1000){
        stringBuffer.append("------------------------------\n")
    }
    println(stringBuffer)
    var time4=System.currentTimeMillis();

    println("pl:"+(time2-time1))
    println("buffer:"+(time4-time3))
}